
// import oimo.dynamics.constraint.contact.ContactImpulse;
// import oimo.dynamics.constraint.info.JacobianRow;

import { ContactImpulse } from "../../contact/ContactImpulse";
import { JacobianRow } from "../JacobianRow";

/**
 * numberernal class.
 */

export class ContactSolverInfoRow {
	/** Used for both velocity and position solver. */
	jacobianN: JacobianRow;

	/** Used for velocity solver. */
	jacobianT: JacobianRow;

	/** Used for velocity solver. */
	jacobianB: JacobianRow;

	/** Used for both velocity and position solver. */
	rhs: number;

	/** Used for velocity solver. */
	cfm: number;

	/** Used for velocity solver. */
	friction: number;

	/** Used for both velocity and position solver. */
	impulse: ContactImpulse;

	constructor() {
		this.jacobianN = new JacobianRow();
		this.jacobianT = new JacobianRow();
		this.jacobianB = new JacobianRow();
		this.rhs = 0;
		this.cfm = 0;
		this.friction = 0;
		this.impulse = null;
	}


	public clear(): void {
		this.jacobianN.clear();
		this.jacobianT.clear();
		this.jacobianB.clear();
		this.rhs = 0;
		this.cfm = 0;
		this.friction = 0;
		this.impulse = null;
	}

}
